1. Technical Field
The present invention relates to an image compressing method for compressing image data. Furthermore, the present invention relates to an image compressing method, an image compressing apparatus, an image forming apparatus, computer program and a computer readable medium for separating an image into a text layer and a background layer and compressing each layer with a corresponding proper method in order to obtain the compressed image data.
2. Description of Related Art
It is well known about image processing method that a text image on a paper or the like is read optically to generate electronic image data. Such the image processing method is utilized in many fields, for example, a scanner apparatus, a facsimile apparatus, a copy apparatus and a multi-function apparatus having these functions. The generated image data may be transmitted with utilizing facsimile communication or e-mail communication. In addition, the generated image data may be stored on database and utilized for several purposes. When an image is optically read out and then image data is generated on the basis of the read image, the generated image data generally has a large data size. Thus, it is required performing compression of the image data for achieving efficient data transmission and efficient data storage.
There are compression methods based on layer separation, such as Mixed Raster Content (MRC), for implementing high compression rate. In such the compression method based on layer separation, a foreground mask is generated from the image and the foreground mask represents a text and/or a line art. The image is separated into a foreground layer and a background layer based on the generated foreground mask, the foreground layer and the background layer are compressed with utilizing respective proper compression method, and then high-compressed image is obtained finally. The foreground layer represents a text consisting of letters and/or a line art illustrated in the image, and is generally compressed by a lossless compression method, such as Joint Bi-level Image Experts Group (JBIG), Modified Modified Read (MMR) or Lempel Ziv Welch (LZW).
On the other hand, the background layer represents image contents other than the text and/or the line art, and is generally compressed by a lossy compression method, such as Joint Photographic Experts Group (JPEG). In a method disclosed by Japanese Patent Application Laid-Open No. 2003-18413, a color text image contains a plurality of letter regions, the color utilized in each text region is extracted, an inclusion image is generated that includes all the text regions illustrated with the same color, the inclusion image is compressed by the MMR, and the attached header is generated which contains the palette information of the inclusion image and the inclusion image information. In the case that an interest text region consisting of letters is illustrated with only one color, the interest text region is compressed by the MMR. In the case that an interest text region is illustrated with a plurality of colors, the interest text region is compressed by lossy compression. Then, the compression of the method results in the fact that the palette information and the text information are attached to the header. Japanese Patent Application Laid-Open No. 2003-18413 further discloses identifying text region of the color text image based on the text information, generating an image (corresponding to so-called background layer) whose identified text region is filled with a predetermined color, and compressing the generated image by the JPEG.
The lossy compression tends to degrade image quality greater than lossless compression. However, it is possible to control the lossy compression easier than the lossless compression. Thus, compression rate of the lossy compression may be increased in the case that preference is given to reduction in the data size and may be decreased in the case that preference is given to increase in the image quality. On the other hand, it is difficult to increase the compression rate of the lossless compression.